<!--  -->
<template>
  <div>
    <span>
      我是子组件的值{{value}}
    </span>
    <button @click="addFn">点击加一</button>
  </div>
</template>

<script>
export default {
  data () {
    return {
    }
  },
  props: {
    value: {
      type: Number,
      default: 0
    }
  },
  methods: {
    addFn () {
      this.$emit('input', this.value + 1)
    }
  }

}

</script>
<style lang='less' scoped>
</style>
